/*  1:   */ package tt.dz.common;
/*  2:   */ 
/*  3:   */ import org.springframework.beans.BeansException;
/*  4:   */ import org.springframework.context.ApplicationContext;
/*  5:   */ import org.springframework.context.ApplicationContextAware;
/*  6:   */ import org.springframework.core.Ordered;
/*  7:   */ import org.springframework.stereotype.Repository;
/*  8:   */ import org.springframework.web.context.ContextLoader;
/*  9:   */ 
/* 10:   */ @Repository
/* 11:   */ public class AppContxtUtil
/* 12:   */   implements ApplicationContextAware, Ordered
/* 13:   */ {
/* 14:   */   private static ApplicationContext applicationContext;
/* 15:   */   
/* 16:   */   public static Object getBean(String name)
/* 17:   */   {
/* 18:18 */     if (applicationContext == null) {
/* 19:19 */       applicationContext = ContextLoader.getCurrentWebApplicationContext();
/* 20:   */     }
/* 21:21 */     return applicationContext.getBean(name);
/* 22:   */   }
/* 23:   */   
/* 24:   */   public void setApplicationContext(ApplicationContext applicationContext)
/* 25:   */     throws BeansException
/* 26:   */   {
/* 27:26 */     applicationContext = applicationContext;
/* 28:   */   }
/* 29:   */   
/* 30:   */   public int getOrder()
/* 31:   */   {
/* 32:31 */     return -2147483648;
/* 33:   */   }
/* 34:   */ }


/* Location:           F:\work\pengyu\mainServer\WEB-INF\classes\
 * Qualified Name:     tt.dz.common.AppContxtUtil
 * JD-Core Version:    0.7.0.1
 */